<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>

<!-- Main hero unit for a primary marketing message or call to action -->
<div class="hero-unit clearfix">
  <div class="pull-left">
    <h3><?php print $this->config->item('school_name') ?></h3>
    <p>Please log-in to continue...</p>
  </div>
  <div class="pull-right">
  	<?php $attributes = array('class' => 'form-horizontal form-login'); ?>
  	<?php echo form_open('home', $attributes); ?>
      <?php if(($errors = validation_errors()) || $login): ?>
        <div class="alert alert-error">
          <a class="close" data-dismiss="alert">×</a>
          <?php echo $login; ?>
          <?php echo $errors; ?>
        </div>
      <?php endif; ?>

      <div class="control-group">
      	<?php echo form_label('Email', 'mail', array('class' => 'control-label')); ?>
        <div class="controls">
          <?php echo form_input('mail', set_value('mail'), 'id="mail" placeholder="someone@example.com"'); ?>
        </div>
      </div>
      <div class="control-group">
      	<?php echo form_label('Password', 'pass', array('class' => 'control-label')); ?>
        <div class="controls">
          <?php echo form_password('pass', '', 'id="pass" placeholder="password"'); ?>
        </div>
      </div>
      <div class="control-group form-actions">
        <?php echo form_submit('submit', 'Sign in', 'class="btn btn-primary"'); ?>
      </div>
    <?php echo form_close(); ?>
  </div>
</div>
